﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Security;

namespace D3DSS.Utility
{
    /// <summary>
    /// 通行证辅助类
    /// </summary>
    public class TokenHelper
    {
        /// <summary>
        /// 创建签名
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="account"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public static string CreateSign(int userID, string account, string password)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(userID);
            sb.Append(account);
            sb.Append(password);
            return FormsAuthentication.HashPasswordForStoringInConfigFile(sb.ToString(), "MD5");
        }
    }
}
